package android.slc.extras.component.tree.ui

import android.app.Application
import android.os.Bundle
import android.slc.appbase.vm.AppBaseViewModel
import android.slc.extras.component.tree.entity.SlcTree

/**
 * 多选盒子数据存储
 */
abstract class TreeMultipleShelfVm<T : SlcTree>(application: Application) :
    AppBaseViewModel(application) {
    val treeMultipleShelfVmBox: TreeMultipleShelfVmBox<T> by lazy {
        setTreeMultipleShelfVmBox()
    }

    fun initVm() {
        registerVmBox(this.treeMultipleShelfVmBox)
    }

    fun initSelectData(bundle: Bundle?) {
        this.treeMultipleShelfVmBox.initSelectData(bundle)
    }

    protected abstract fun setTreeMultipleShelfVmBox(): TreeMultipleShelfVmBox<T>
}